package com.scraper.dao.hibernate;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;

import com.scraper.dao.SaleObjectDAO;
import com.scraper.model.SaleObject;

public class SaleObjectDAOImpl extends BaseDAOImpl<SaleObject> implements SaleObjectDAO{

	public SaleObjectDAOImpl() {
		super(SaleObject.class);
	}

	public SaleObject getByID(Integer id) {
		Criteria criteria = getSession().createCriteria(entityClass);
		criteria.add(Restrictions.eq("id", id));
		return (SaleObject) criteria.uniqueResult();
	}

}
